﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Web.Security;
public partial class admin_Mng_Sites : System.Web.UI.Page {
    protected void Page_Load(object sender, EventArgs e) {

    }
    /// <summary>
    /// Handles the SelectedIndexChanged event of the GridViewSites control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    /// <action>go to View_Site.aspx with site_id as query string</action>
    protected void GridViewSites_SelectedIndexChanged(object sender, EventArgs e) {
        string site_id = GridViewSites.SelectedDataKey.Value.ToString();
        Server.Transfer("View_Site.aspx?site_id=" + site_id);
    }
    /// <summary>
    /// Handles the Click event of the CreateSiteButton control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    /// <action>go to Create_Site.aspx</action>
    protected void CreateSiteButton_Click(object sender, EventArgs e) {
        Server.Transfer("Create_Site.aspx");
    }
    protected void LoginStatus1_LoggingOut(object sender, LoginCancelEventArgs e)
    {


        Session.Contents.Remove("UserDetails");
        Session.Abandon();
        Session.Contents.RemoveAll();
        FormsAuthentication.SignOut();
        Response.Redirect("../Default.aspx");
    }
}
